﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/ESF.SSO.Core.Entities" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/ESF.SSO.Core.Entities" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import namespace="http://schemas.datacontract.org/2004/07/ESF.General.Entity" />
  <xs:complexType name="User">
    <xs:complexContent mixed="false">
      <xs:extension base="tns:Person">
        <xs:sequence>
          <xs:element minOccurs="0" name="Alias" nillable="true" type="xs:string" />
          <xs:element minOccurs="0" name="IsEnabled" nillable="true" type="xs:boolean" />
          <xs:element minOccurs="0" name="Password" nillable="true" type="xs:string" />
          <xs:element xmlns:q1="http://schemas.datacontract.org/2004/07/ESF.General.Entity" minOccurs="0" name="SecurityQuestion" nillable="true" type="q1:BasicReference" />
          <xs:element minOccurs="0" name="SecurityQuestionAnswer" nillable="true" type="xs:string" />
          <xs:element minOccurs="0" name="SessionID" nillable="true" type="xs:string" />
          <xs:element minOccurs="0" name="UserTerminal" nillable="true" type="tns:Terminal" />
          <xs:element xmlns:q2="http://schemas.datacontract.org/2004/07/ESF.General.Entity" minOccurs="0" name="extEnt" nillable="true" type="q2:BasicReference" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="User" nillable="true" type="tns:User" />
  <xs:complexType name="Person">
    <xs:complexContent mixed="false">
      <xs:extension xmlns:q3="http://schemas.datacontract.org/2004/07/ESF.General.Entity" base="q3:BaseEntity">
        <xs:sequence>
          <xs:element minOccurs="0" name="BirthDate" nillable="true" type="xs:dateTime" />
          <xs:element minOccurs="0" name="Email" nillable="true" type="xs:string" />
          <xs:element minOccurs="0" name="Enterprise" nillable="true" type="tns:Enterprise" />
          <xs:element minOccurs="0" name="FirstName" nillable="true" type="xs:string" />
          <xs:element minOccurs="0" name="Gender" nillable="true" type="q3:BasicReference" />
          <xs:element minOccurs="0" name="ID" nillable="true" type="xs:int" />
          <xs:element minOccurs="0" name="IdentificationNumber" nillable="true" type="xs:string" />
          <xs:element minOccurs="0" name="IdentificationType" nillable="true" type="q3:BasicReference" />
          <xs:element minOccurs="0" name="LastName" nillable="true" type="xs:string" />
          <xs:element minOccurs="0" name="Locations" nillable="true" type="tns:ArrayOfLocation" />
          <xs:element minOccurs="0" name="Position" nillable="true" type="xs:string" />
          <xs:element minOccurs="0" name="Profession" nillable="true" type="xs:string" />
          <xs:element minOccurs="0" name="SecondName" nillable="true" type="xs:string" />
          <xs:element minOccurs="0" name="SurName" nillable="true" type="xs:string" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Person" nillable="true" type="tns:Person" />
  <xs:complexType name="Enterprise">
    <xs:complexContent mixed="false">
      <xs:extension base="tns:LocatedBasicReference">
        <xs:sequence>
          <xs:element minOccurs="0" name="IdentificationNumber" nillable="true" type="xs:string" />
          <xs:element minOccurs="0" name="IdentificationNumberDigit" nillable="true" type="xs:string" />
          <xs:element xmlns:q4="http://schemas.datacontract.org/2004/07/ESF.General.Entity" minOccurs="0" name="IdentificationType" nillable="true" type="q4:BasicReference" />
          <xs:element minOccurs="0" name="Terminals" nillable="true" type="tns:ArrayOfTerminal" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Enterprise" nillable="true" type="tns:Enterprise" />
  <xs:complexType name="LocatedBasicReference">
    <xs:complexContent mixed="false">
      <xs:extension xmlns:q5="http://schemas.datacontract.org/2004/07/ESF.General.Entity" base="q5:BasicReference">
        <xs:sequence>
          <xs:element minOccurs="0" name="Location" nillable="true" type="tns:Location" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="LocatedBasicReference" nillable="true" type="tns:LocatedBasicReference" />
  <xs:complexType name="Location">
    <xs:sequence>
      <xs:element minOccurs="0" name="Address" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="CellPhoneNumber" nillable="true" type="xs:string" />
      <xs:element xmlns:q6="http://schemas.datacontract.org/2004/07/ESF.General.Entity" minOccurs="0" name="City" nillable="true" type="q6:BasicReference" />
      <xs:element xmlns:q7="http://schemas.datacontract.org/2004/07/ESF.General.Entity" minOccurs="0" name="Country" nillable="true" type="q7:BasicReference" />
      <xs:element minOccurs="0" name="ID" nillable="true" type="xs:int" />
      <xs:element minOccurs="0" name="Name" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="PhoneNumber" nillable="true" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="Location" nillable="true" type="tns:Location" />
  <xs:complexType name="ArrayOfTerminal">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Terminal" nillable="true" type="tns:Terminal" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfTerminal" nillable="true" type="tns:ArrayOfTerminal" />
  <xs:complexType name="Terminal">
    <xs:complexContent mixed="false">
      <xs:extension base="tns:LocatedBasicReference">
        <xs:sequence>
          <xs:element minOccurs="0" name="Enterprise" nillable="true" type="tns:Enterprise" />
          <xs:element minOccurs="0" name="UserAlias" nillable="true" type="xs:string" />
          <xs:element minOccurs="0" name="UserHostAddress" nillable="true" type="xs:string" />
          <xs:element minOccurs="0" name="UserSessionID" nillable="true" type="xs:string" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Terminal" nillable="true" type="tns:Terminal" />
  <xs:complexType name="ArrayOfLocation">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Location" nillable="true" type="tns:Location" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfLocation" nillable="true" type="tns:ArrayOfLocation" />
</xs:schema>